.appMenu {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  transition: padding var(--menu-bar-collapse-transition-duration)
    var(--menu-bar-collapse-transition-timing-function);
  scrollbar-width: none; /* Firefox */

  &::-webkit-scrollbar {
    width: 0;
    background: transparent;
  }
}

.menuContainer {
  padding: 12px 0 8px;

  &.empty {
    padding: 0;
  }
}

.menuGroup + .menuGroup {
  margin-top: 12px;
}

.menuGroup:last-child {
  .menuContainer {
    padding-bottom: 0;
  }
}

.menuTitleLink {
  display: flex;
  align-items: center;
  height: 50px;
  border-radius: 6px;
  padding: 0 10px 0 24px;
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 16px;
  overflow: hidden;
  transition: none;

  &:hover {
    color: #fff;
    background-color: #3e86e6;
  }
}

.menuTitleIcon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  font-size: 20px;
}

.menuTitleText {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menuTitleText {
  margin-left: 14px;
}

.appMenu :global(.ant-menu) {
  background-color: transparent;

  :global(.ant-menu-item) {
    margin: 0;
    border-radius: 6px;

    &:not(:global(.ant-menu-item-selected)):hover {
      background-color: #3e86e6;
    }

    > a {
      color: #fff;

      :global(.anticon) svg {
        vertical-align: -0.125em;
      }
    }
  }

  :global(.ant-menu-item-selected) {
    background-color: #0071eb;

    > a {
      color: #fff;
    }
  }

  &:global(.ant-menu-sub) {
    background-color: transparent;
    box-shadow: none;

    :global(.ant-menu-item) {
      transform: translate(-2px, 0);
    }
  }

  :global(.ant-menu-submenu-title) {
    margin: 0;
    color: #fff;

    :global(.ant-menu-submenu-arrow) {
      &::before,
      &::after {
        background: #fff;
      }
    }
  }

  :global(.ant-menu-submenu-selected) {
    margin-left: -12px;
    margin-right: -12px;
    padding-left: 12px;
    padding-right: 12px;
    background-color: rgba(0, 99, 206, 0.2);
  }

  :global(.ant-menu-item-group-title) {
    color: rgba(255, 255, 255, 0.65);
    transition: none;
  }
}

.appMenu.collapsed {
  padding: 10px 6px;

  .menuTitleLink {
    padding: 0 14px;
  }

  .menuTitleText {
    width: 0;
    margin-left: 0;
    opacity: 0;
  }

  :global(.ant-menu) :global(.ant-menu-submenu-selected) {
    margin-left: -6px;
    margin-right: -6px;
    padding-left: 6px;
    padding-right: 6px;
  }

  :global(.ant-menu-item-group-title) {
    visibility: hidden;
    position: relative;

    &::before {
      content: "·";
      visibility: visible;
      position: absolute;
      left: 0;
      right: 0;
      text-align: center;
      font-weight: 700;
    }
  }
}

.menuTitleLink,
.appMenu :global(.ant-menu) :global(.ant-menu-item) {
  transition: padding var(--menu-bar-collapse-transition-duration)
    var(--menu-bar-collapse-transition-timing-function);
}

.appMenu :global(.ant-menu) :global(.ant-menu-submenu-selected),
.menuTitleText {
  transition: all var(--menu-bar-collapse-transition-duration)
    var(--menu-bar-collapse-transition-timing-function);
}
